package factory.pizzaResource;

import factory.PizzaIngredientFactory;

/**
 * Created by lenovo on 2017/12/31.
 */
public class ChessPizza extends Pizza {
    PizzaIngredientFactory pizzaIngredientFactory;
    public ChessPizza(PizzaIngredientFactory ingredientFactory){
        this.pizzaIngredientFactory=ingredientFactory;
    }

    @Override
    void prepare() {
        System.out.println("preparing "+name);
        dough=pizzaIngredientFactory.createDoutgh();
        sauce=pizzaIngredientFactory.createSauch();
        cheese=pizzaIngredientFactory.createCheese();
    }
}
